/*
 * @(#)DBAction.java 0.0.1-SNAPSHOT
 * Copyright Group B
 */

package grupb.upf.DBManager.impl;

/**
 * <p>This interface manages the query to the database.</p>
 *
 * @version    0.0.1-SNAPSHOT
 * @author     Group B
 */
public final class DBAction implements grupb.upf.DBManager.DBAction {
    /**
     * The id of the action.
     */
    private String actionId;
    /**
     * The parameters of the action.
     */
    private Object[] parameters;
    /**
     * This method allows us to execute an action in the database.
     * @param dbActionId The action
     * @param qParameters The parameters of the action
     */
    public DBAction(final String dbActionId, final Object [] qParameters) {
        this.actionId = dbActionId;
        this.parameters = qParameters;
    }
    /**
     * This methods gets the paramenteres of the action.
     * @return The parameters of the action
     */
    @Override
    public Object[] getParameters() {
        return parameters;
    }
    /**
     * This method sets the parameters of the action.
     * @param aParameters The parameters of the action
     */
    @Override
    public void setParameters(final Object[] aParameters) {
        this.parameters = aParameters;
    }
    /**
     * This methods returns the id of the action.
     * @return The id of the action.
     */
    @Override
    public String getActionId() {
        return actionId;
    }
    /**
     * This method sets and specific action.
     * @param anActionId The id of the action
     */
    @Override
    public void setActionId(final String anActionId) {
        this.actionId = anActionId;
    }
}
